getBalancesAsOfDates

Get a single account's balance as of a list of given dates. The balances will be in the account's currency type. This method returns a zero balance if the given dates are before the earliest transaction and the account's start date.

Return

The balances (in the account's currency) of the given account as of the end of the corresponding given dates in asofDates.

Parameters

book

The account book.

account

Account to obtain the balance for.

asofDates

The dates to obtain the balance for (note: whilst not recommended, this function can tolerate duplicate as of dates)..


fun getBalancesAsOfDates(book: AccountBook, account: Account, asofDates: IntArray?, outOfDateAsZero: Boolean): LongArray

Get a single account's balance as of a list of given dates. The balances will be in the account's currency type. If a given date is prior to both the earliest transaction and the account's start date, then return Long.MIN_VALUE for the balance. Transactions for the given date will be included, so it is the balance as of the end of the given date. If outOfDateAsZero is true, this is overridden and 0 is returned even if the date is too early.

Return

The balances (in the account's currency) of the given account as of the end of the corresponding given dates in asofDates.

Parameters

book

The account book.

account

The Account to obtain the balance for.

asofDates

The as-of dates to obtain the balance for. (note: whilst not recommended, this function can tolerate duplicate as of dates).

outOfDateAsZero

True if out-of-date returns a zero balance, false if it returns a Long.MIN_VALUE if the account did not exist.